<ui:composition
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf"
		>

	<h:panelGrid id="#{idPrefix}DepartmentEditPanel" columns="3" width="380px">
		<h:outputText value="#{departmentBundle.faculty}" styleClass="requiredField"/>
		<itdep:entitySelectMenu id="#{idPrefix}Faculty" value="#{studentGroupBean.filter.faculty}"
								entityType="faculty"
								format="{i18n.shortName}"
								styleClass="sizeCopmonent" required="true">
			<a4j:support event="onchange" reRender="#{idPrefix}DepartmentEditPanel" ajaxSingle="true"/>
		</itdep:entitySelectMenu>
		<itdep:errorMessage for="#{idPrefix}Faculty"/>

		<h:outputText value="#{departmentBundle.speciality}" styleClass="requiredField"/>
		<itdep:entitySelectMenu id="#{idPrefix}Speciality" value="#{studentGroupBean.filter.speciality}"
								filter="#{studentGroupBean.filter}"
								entityType="speciality"
								format="{i18n.shortName}"
								disabled="#{empty studentGroupBean.filter.faculty}"
								styleClass="sizeCopmonent" required="true">
			<a4j:support event="onchange" reRender="#{idPrefix}DepartmentEditPanel" ajaxSingle="true"/>
		</itdep:entitySelectMenu>
		<itdep:errorMessage for="#{idPrefix}Speciality"/>

		<h:panelGroup>
			<h:outputText value="#{departmentBundle.specialization}" styleClass="requiredField"/>
			<rich:spacer width="7"/>
		</h:panelGroup>
		<itdep:entitySelectMenu id="#{idPrefix}Specialization" value="#{studentGroupBean.filter.specialization}"
								entityType="specialization"
								format="{i18n.shortName}"
								filter="#{studentGroupBean.filter}"
								disabled="#{empty studentGroupBean.filter.speciality}"
								styleClass="sizeCopmonent" required="true">
			<a4j:support event="onchange" reRender="#{idPrefix}DepartmentEditPanel" ajaxSingle="true"/>
		</itdep:entitySelectMenu>
		<itdep:errorMessage for="#{idPrefix}Specialization"/>

		<h:outputText value="#{departmentBundle.studentGroup}" styleClass="requiredField"/>
		<itdep:entitySelectMenu id="#{idPrefix}StudentGroup" value="#{studentGroupBean.filter.studentGroup}"
								entityType="student-group"
								format="{i18n.description}"
								filter="#{studentGroupBean.filter}"
								disabled="#{empty studentGroupBean.filter.specialization}"
								styleClass="sizeCopmonent" required="true">
			<a4j:support event="onchange" reRender="#{idPrefix}DepartmentEditPanel,bookNumberPanelGroup"
						 ajaxSingle="true"/>
		</itdep:entitySelectMenu>
		<itdep:errorMessage for="#{idPrefix}StudentGroup"/>

	</h:panelGrid>
	<h:panelGroup id="bookNumberPanelGroup">
		<ui:insert name="studentBookNumber"/>
	</h:panelGroup>

</ui:composition>
